package homework.exp02;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class E {
    static Scanner cin = null;

    static {
        try {
            cin = new Scanner(new FileReader(new File("E.in")));
        } catch (IOException e) {
            cin = new Scanner(System.in);
        }
    }

    private static final String REGEX = "[0-9]+";

    public static void main(String[] args) {
        String line = cin.nextLine();
        Pattern p = Pattern.compile(REGEX);// RE->FA->DFA
        Matcher m = p.matcher(line); // 获取 matcher 对象
        int count = 0;
        // A a=new B();
        List<String> numbers = new ArrayList<String>();
        while (m.find()) {
            count++;
            numbers.add(m.group());
        }
        System.out.println(count);
        for (String number : numbers) {
            System.out.println(number);
        }
        cin.close();
    }
}